﻿using BCCommon.Enums;
using BCCommon.TMS.Driver;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace BCEntity.TMS.HealthReport
{
    /// <summary>
    /// 健康上报
    /// </summary>
    public class HealthReportEntity
    {
        /// <summary>
        /// 健康上报Id
        /// </summary>
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public long HealthReportId { get; set; }

        /// <summary>
        /// 是否发烧
        /// </summary>
        public bool IsFever { get; set; }

        /// <summary>
        /// 是否咳嗽
        /// </summary>
        public bool IsCoughs { get; set; }

        /// <summary>
        /// 不舒适内容
        /// </summary>
        public string DiscomfortContent { get; set; }

        /// <summary>
        /// 是否不舒服
        /// </summary>
        public bool IsDiscomfort => (this.DiscomfortContent != null && this.DiscomfortContent != "") ? true : false;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 上报日期
        /// </summary>
        public DateTime ReportDate { get; set; }

        /// <summary>
        /// 角色（员工，司机，骑手）
        /// </summary>
        public RoleType Role { get; set; }
        /// <summary>
        /// 公司Id
        /// </summary>
        public long CompanyId { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 管理员Id
        /// </summary>
        public long? AdminId { get; set; }

        /// <summary>
        /// 用户Id
        /// </summary>
        public long? UserId { get; set; }

        /// <summary>
        /// 司机Id
        /// </summary>
        public long? DriverId { get; set; }

        /// <summary>
        /// 体温（度）
        /// </summary>
        public decimal Temperature { get; set; }

        /// <summary>
        /// 体温计图片
        /// </summary>
        public string TemperaturePhoto { get; set; }

        /// <summary>
        /// 血脂（总胆固醇）
        /// </summary>
        public decimal? TotalCholesterol { get; set; }

        /// <summary>
        /// 血脂（甘油三酯）
        /// </summary>
        public decimal? Triglyceride { get; set; }

        /// <summary>
        /// 血脂（高密度脂蛋白）
        /// </summary>
        public decimal? HighDensityLipoprotein { get; set; }

        /// <summary>
        /// 血脂（低密度脂蛋白）
        /// </summary>
        public decimal? LDL { get; set; }

        /// <summary>
        /// 血压（收缩压）
        /// </summary>
        public decimal? SystolicPressure { get; set; }

        /// <summary>
        /// 血压（舒张压）
        /// </summary>
        public decimal? DiastolicPressure { get; set; }

        /// <summary>
        /// 血糖
        /// </summary>
        public decimal? BloodGlucose { get; set; }

        /// <summary>
        /// 心跳（次/分钟）
        /// </summary>
        public int? HeartBeat { get; set; }

        /// <summary>
        /// 身高（cm）
        /// </summary>
        public int? Height { get; set; }

        /// <summary>
        /// 体重（kg）
        /// </summary>
        public decimal? Weight { get; set; }
    }
}
